/*
 * cat1.h
 *
 *  Created on: Sep 14, 2021
 *      Author: soliber
 */

#ifndef CAT1_H_
#define CAT1_H_

#include "main.h"
#include "usart.h"
#include "cmsis_os.h"

//任务
extern osThreadId cat1TaskHandle;

//发布队列（内容均为字符串）
extern osMessageQId publish_q_id;

//标志位
extern uint8_t publish_enable;

//信号
#define CAT1_SIGNAL_RX_CPLT 	(1<<0)
#define CAT1_SIGNAL_P_UPDATE	(1<<1)
#define CAT1_SIGNAL_R_UPDATE	(1<<2)
#define CAT1_SIGNAL_V_UPDATE	(1<<3)
#define CAT1_SIGNAL_SUB_RX		(1<<4)
#define CAT1_SIGNAL_DISCONNECT	(1<<5)
#define CAT1_SIGNAL_BUTTON		(1<<6)
#define CAT1_SIGNAL_POWERDOWN	(1<<7)
#define CAT1_SIGNAL_POWERDOWN_OK	(1<<8)

void cat1_tx_cplt_isr(void);
void cat1_rx_cplt_isr(uint16_t size);

#endif /* CAT1_H_ */
